package cn.zpfhomework01;

public class Car {
   String brand;
   double price;
   double weight;
   double oilVolume;
   public void run(){
      System.out.println("汽车正在行驶中...");
   }
   public void brake(){
      System.out.println("前方红灯，请刹车！");
   }
   public  void whistle(){
      System.out.println("遇见行人，请鸣笛...");
   }
   public double OilVolume(){
      if (oilVolume==0){
         System.out.println("油量不足，请停止行驶！");

      }else{
         System.out.println("请继续行驶...");
      }
      return oilVolume;
   }
}
